import axios from '@/libs/api.request.js'

export const getExamList = data =>{
    return axios.request({
        url:"exam/getExamList",
        data:data,
        method:'post'
    });
};

export const saveExam = data => {
    return axios.request({
        url:'exam/saveExam',
        data:data,
        method:'post'
    });
};

export const findById = data =>{    //开始考试前,确认考试状态没被定时器修改
    return axios.request({
        url:`exam/findById/${data.id}`,
        method:'get',
        data:null
    });
};

export const startExam = data => {
    return axios.request({
        url:'exam/start',
        data:data,
        method:'post'
    });
};

export const getStudentScoreListByExam = data => {
    return axios.request({
        method:'post',
        data:data,
        url:'exam/getStudentScoreListByExam'
    });
};

export const stopExam = data => {
    return axios.request({
        method:'post',
        data:data,
        url:'exam/stopExam'
    });
};


export const getStudentAskResultList = data => {
    return axios.request({
        method:'post',
        data:data,
        url:'exam/getStudentAskResultList'
    });
};

export const updateStudentAskScore = data => {
    return axios.request({
        method:'post',
        data:data,
        url:'exam/updateStudentAskScore'
    });
};

export const getStudentUpperResultList = data => {
    return axios.request({
        method:'post',
        data:data,
        url:'exam/getStudentUpperResultList'
    });
};

export const updateStudentUpperScore = data => {
    return axios.request({
        method:'post',
        data:data,
        url:'exam/updateStudentUpperScore'
    });
};

export const overExam = data => {
    return axios.request({
        method:'post',
        data:data,
        url:'exam/overExam'
    });
};


export const handleNotPerson = data => { //获得未参考，未批阅上机题，未批阅问答题人员名单
    return axios.request({
        method:'post',
        data:data,
        url:'exam/handleNotPerson'
    });
};

export const notConsult = data => { //执行某个学生某个试卷无需参考
    return axios.request({
        method:'post',
        data:data,
        url:'exam/notConsult'
    });
};

export const analysisExam = data => { //试卷分析
    return axios.request({
        method:'post',
        data:data,
        url:'exam/analysisExam'
    });
};

export const explainExam = data => { //试卷讲解
    return axios.request({
        method:'post',
        data:data,
        url:'exam/explainExam'
    });
};

export const superviseExam = data => {
    return axios.request({
        method:'post',
        data:data,
        url:'exam/superviseExam'
    });
};